assume cs:code, ds:data

; 12(6E0H) 13（780H) 14 行

data segment
    db 'welcome to masm!' ; 16 32 (3FH)
    ; 绿色
    db 00000010b
    ; 绿底红色
    db 00100100b
    ; 白底蓝色
    db 01110001b
data ends

code segment
start:
    mov ax, data
    mov ds, ax
    mov bx, 0

    mov ax, 0b800h
    mov es, ax

    mov cx, 16
    mov si, 0
write:
    mov al, [si]
    mov ah, ds:[16]
    mov es:[0aa0h + 3eh + bx], ax
    mov ah, ds:[17]
    mov es:[0aa0h + 3eH + 0a0h + bx], ax
    mov ah, ds:[18]
    mov es:[0aa0h + 3eH + 0a0h + 0a0h + bx], ax
    add bx, 2
    inc si
    loop write

    mov ax, 4c00h
    int 21h
code ends
end start